\begin{block}{}
\clang{O mesmo objecto result set (rs) partilhado entre dois threads: T1 e T2.}
{The same result set object (rs) is shared between two threads: T1 and T2.}

\hfill \\

\pause
{\bf \clang{Thread em execução}{Thread executing}:} 
\only<2,5>{T1}\only<3,4>{T2}

\begin{columns}
\begin{column}{.3\textwidth}
\begin{semiverbatim}
// T1                      
\textcolor<2>{RoyalBlue}{rs.absolute(2);}
\textcolor<5>{RoyalBlue}{cval = rs.getInt(1);}
\end{semiverbatim}
\end{column}
\begin{column}{.3\textwidth}
\begin{semiverbatim}
// T2
\textcolor<3>{RoyalBlue}{rs.last();}
\textcolor<4>{RoyalBlue}{cval = rs.getInt(1);}
\end{semiverbatim}
\end{column}
\begin{column}{.3\textwidth}
{\small
\begin{tabular}{l|c|}
  \cline{2-2}
  \qquad & \qquad \\\cline{2-2}
  \only<2>{$\rightarrow$}\only<3,4,5>{$\qquad$}& \qquad \\\cline{2-2}
  \qquad     & \qquad \\\cline{2-2}
  \qquad     & \qquad \\\cline{2-2}
  \qquad     & \qquad \\\cline{2-2}
  \qquad     & \qquad \\\cline{2-2}
  \only<2>{\qquad}\only<3,4>{$\rightarrow$}\only<5>{\alert{$\rightarrow$}} & \qquad \\\cline{2-2}
\end{tabular}
}
\end{column}
\end{columns}

\visible<5>{{\bf \alert{T1 \clang{lê o valor da linha errada!}{reads from the wrong line!}}}}
\end{block}
